import useCounterStore from "../stores/useCounterStore.js";
import { storeToRefs } from "pinia";

export default {
  setup() {
    const store = useCounterStore();
    const { count, doubleCount } = storeToRefs(store);
    const { increment } = store;
    return { count, doubleCount, increment };
  },
  template: /*html*/ `<div class="home">
    <h1>Home</h1>
    <p>{{ count }}</p>
    <p>{{ doubleCount }}</p>
    <button @click="increment">+1</button>
    <el-button @click="increment">element button</el-button>
  </div>`
};
